<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Home extends MY_Controller {

	public $data 	= 	array();
 	public $_template = array();
	public function __construct() {
		//parent::Controller();
		parent::__construct(); //for CI 2.x users 
		$this->load->module_model('home', 'homepage_model', 'homepage');
		$this->load->helper('text');
	}
 
	public function index() 
	{
		$this->system_library->get_site_info();
		$data['ItemID'] = 'Homepage';
		$data['title'] = $this->system_library->settings['site_name'];
		$data['description'] = $this->system_library->settings['site_description'];
		$navigation['menuID'] = '1'; // HomePage
		$data['navigation'] = $navigation;
		
		//use desktop
		/*$data['featuredproduct']	= $this->homepage->get_featured_product();
		$data['androidproduct']		= $this->homepage->get_game_android_product();
		$data['newproduct']			= $this->homepage->get_new_product();
		
		//use for mobile template
		$data['mobilefeaturedproduct']		= $this->homepage->get_featured_product_mobile();
		$data['mobileandroidproduct']		= $this->homepage->get_game_android_product_mobile();
		$data['mobilenewproduct']			= $this->homepage->get_new_product_mobile();
		
		//use for template iphone
		$data['featuredproductiphone']	= $this->homepage->get_featured_product_iphone();
		$data['newproductiphone']	= $this->homepage->get_new_product_iphone();*/
		
		$this->_template['page']	= 'home/home';
		$this->system_library->load($this->_template['page'], $data);
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */